package chapter04.field_method05;

public class UserLogin {
//    private String name;
//    private int password;
    //    public UserLogin(String U,int P){
//        name = U;
//        password = P;
//    };




    String getName;
    int getPassword;

    public void login(String UserName,int Password){
        if (UserName.equals(getName) && Password == getPassword){
            System.out.println("登录成功");
        }else {
            System.out.println("登录失败,密码或账号错误");
        }
    }
}
